package com.probiz.estore.product.service;

import java.util.List;

import com.probiz.estore.common.model.customer.Consult;
import com.probiz.estore.common.model.product.StockNotify;
import com.probiz.estore.core.search.SearchCriteria;
import com.probiz.estore.core.service.GenericManager;
import com.probiz.estore.product.model.StockNotifySearchCriteria;

/**
 * Manager interface for StockNotify, responsible for business processing, and communicate between web and persistence layer.
 *
 */
public interface StockNotifyManager extends GenericManager<StockNotify> {
	
	/**
	 * 搜索
	 * @param stockNotifySearchCriteria
	 * @param searchCriteria
	 * @return
	 */
	public List<StockNotify> searchByCriteria(StockNotifySearchCriteria stockNotifySearchCriteria, SearchCriteria searchCriteria);
	
	/**
     * 搜索，从GenericController借鉴过来。防止翻页过钱
     *
     * @param stockNotifySearchCriteria 自定义搜索条件
     * @param searchCriteria        分页搜索条件
     * @return 搜索结果
     */
    public List<StockNotify> searchByCriteriaForController(StockNotifySearchCriteria stockNotifySearchCriteria, SearchCriteria searchCriteria);
	/**
	 * 发送缺货通知
	 * @param stockNotify 缺货登记实体
	 */
	public void sendStockNotify(StockNotify stockNotify); 
	/**
	 * 发送邮件
	 * @param stockNotify 缺货登记实体
	 */
	public void sendMail(StockNotify stockNotify); 
	/**
	 * 获得用户的缺货通知
	 * @param customerId
	 * @return
	 */
	public List<StockNotify> getByCustomerId(Integer customerId);
	
	/**
	 * 获得未通知的缺货登记信息
	 * @return 
	 */
	public Long countUninformStockNotifyTotal();
}
